<?php
/**
 * Created by PhpStorm.
 * User: 小瓶子
 * Date: 2018/11/8
 * Time: 16:11
 */
namespace app\home\model;
use think\Model;
use think\Db;

class Merchant extends Model
{
    public $table;
    public function insert($table,$data)
    {//商家注册
        $this->table = $table;
        $red = DB::table($this->table)->insert($data);
        if ($red){
            return $red;
        }
    }

    public function show($table,$data)
    {//商家登陆
        $this->table = $table;
        $red = Db::table($this->table)->where($data)->find();
        if ($red){
            return $red;
        }
    }
}